/*********************************************************************************
 *      Copyright:  (C) 2021 litupei<lismilepei@163.com>
 *                  All rights reserved.
 *
 *       Filename:  prj_zlog.c
 *    Description:  This file 
 *                 
 *        Version:  1.0.0(2021年08月12日)
 *         Author:  litupei <lismilepei@163.com>
 *      ChangeLog:  1, Release initial version on "2021年08月12日 11时42分24秒"
 *                 
 ********************************************************************************/

#include "prj_zlog.h"

int zlog_set(char *zlog_conf_file, zlog_category_t **zlog)
{
	int	rc;
    
	printf("zlog path :%s \n", zlog_conf_file);
	rc = zlog_init(zlog_conf_file);
	if(rc)
	{
        	printf ("zlog init failure!: %s \n", strerror(errno));
        	return -1;
	}
	//printf ("zlog int success!\n");
    
	*zlog = zlog_get_category("z_msg");
	if(!*zlog)
	{
        	printf ("zlog category failure\n");
        	zlog_fini();
        	return -1;
	}
    	printf ("zlog category success!\n");

    	return 0;
}
